package fruitshopmall.Entity;

/**
 * Created with IntelliJ IDEA.
 *
 * @Author: LittleFisher
 * @Date: 2021/12/26/10:30
 * @Description:
 */
public class Result <T>{
    /**
     * 描述 操作结果状态码 详细看状态码表
     */
    private int code;

    /**
     * 返回操作数据
     */
    private T data;

    /**
     * 错误提示信息
     */
    private String Message;

    public String getMessage() {
        return Message;
    }

    public void setMessage(String message) {
        Message = message;
    }


    public Result() {
    }

    public Result(int code, T data) {
        this.code = code;
        this.data = data;
    }

    public Result(int code, String message) {
        this.code = code;
        Message = message;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public T getData() {
        return data;
    }

    public void setData(T data) {
        this.data = data;
    }

    @Override
    public String toString() {
        return "Result{" +
                "code=" + code +
                ", data=" + data.toString() +
                ", Message='" + Message + '\'' +
                '}';
    }
}
